﻿using System.Collections.Generic;
using Dost.Khcn.Data.EntityModel;
using Dost.Khcn.Data.Implements;
using Dost.Khcn.Data.Interfaces;

namespace Dost.Khcn.Biz
{
    public class CongTrinhNghienCuuBiz
    {
        #region Properties

        private ICongTrinhNghienCuuDao _congTrinhNghienCuuDao;

        private ICongTrinhNghienCuuDao CongTrinhNghienCuuData
        {
            get
            {
                return (_congTrinhNghienCuuDao ?? (_congTrinhNghienCuuDao = new CongTrinhNghienCuuDao()));
            }
        }

        #endregion

        public List<CongTrinhNghienCuu> GetCongTrinhNghienCuus(int chuyenGiaId)
        {
            return chuyenGiaId <= 0 ? null : CongTrinhNghienCuuData.GetCongTrinhNghienCuus(chuyenGiaId);
        }

        public CongTrinhNghienCuu Create(CongTrinhNghienCuu congTrinhNghienCuu)
        {
            return CongTrinhNghienCuuData.Create(congTrinhNghienCuu);
        }

        public void Update(CongTrinhNghienCuu congTrinhNghienCuu)
        {
            CongTrinhNghienCuuData.Update(congTrinhNghienCuu);
        }

        public void Delete(int id)
        {
            CongTrinhNghienCuuData.Delete(id);
        }
    }
}
